package com.beiding.service;

import com.beiding.pojo.order.Evaluation;
import com.beiding.pojo.order.Order;

import java.util.List;

public interface OrderService extends ResourceService<Order>{


    //保存一个订单
    String save(Order order);

    //移除一个订单
    void remove(String id);

    //完成支付
    void paid(String id);

    //评价一个订单
    void evaluate(String id, Evaluation evaluate);

    //获取未付款订单
    List<Order> getNonPayment(String name);

    //获取已付款订单
    List<Order> getPayed(String name);

    //获取待评价订单
    List<Order> getEvaluate(String name);

    //直接退款
    Order refund(String id);

    //申请退款
    Order refund(String id, String reason);

    //检查订单的房源持有者
    void checkRoomHolder(String id, String name);

    void accept(String id);

    String checkIn(String id, String checkInKey);

    List<Order> getOrdersByRoomHolder(String name);

    void disagreeRefund(String id);

    void agreeRefund(String id);

    void active(String id, String name);

    void withholdDeposit(String id, String withholdDepositReason, float depositWithhold);

    void agreeWithholdDeposit(String id);

    void disagreeWithholdDeposit(String id);

    void agreeRefundDeposit(String id);

    int revocationRefund(String id);

    void arbitrationWithholdDeposit(String id);

    void arbitrationRefund(String id);

    void sentUnlockEmail(String name, String email, String orderId);

    void unlockOrder(String token);


    //强制退款

}
